<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateExpressesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('expresses', function (Blueprint $table) {
            $table->id()->comment('快递公司表');
            $table->string('code')->comment('快递公司简称');
            $table->string('name')->comment('快递公司全称');
            $table->tinyInteger('partner_id')->index()->default(1)->comment('是否需要月结账号:0否 1是(默認)');
            $table->string('account')->comment('账号');
            $table->string('password')->comment('密码');
            $table->string('net_name')->comment('网点名称');
            $table->integer('sort')->default(0)->comment('排序');
            $table->tinyInteger('partner_key')->default(1)->comment('是否需要月结密码:0否 1是(默認)');
            $table->tinyInteger('is_net')->default(1)->comment('是否需要取件网店:0否 1是(默認)');
            $table->tinyInteger('is_show')->default(1)->comment('是否显示:0不显示 1显示(默認)');
            $table->tinyInteger('status')->default(1)->comment('是否可用:0不可用 1可用(默認)');
            $table->timestamps();

        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('expresses');
    }
}
